<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
// import constants from '../utils/constants';
// const {
//   ACCESS_TOKEN,
//   USER_INFO
// } = constants;

import constants from "_u/constants";

export default {
  data() {
    return {}
  },
  mounted(){
    let userInfo = JSON.parse(window.localStorage.getItem(constants.ACCESS_TOKEN))
    console.log("个人信息",this.userInfo)
    if(userInfo.status === -2){
      this.$router.push({
        name: "register",
        query:{
          status:-2
        }
      });
    }
    if(userInfo.status === -1){
      this.$router.push({
        name: "register",
        query:{
          status:-1
        }
      });
    }
  }
}
</script>

<style>
body {
  margin: 0;
  padding: 0;
  background: #fafafa;
  min-height: 100vh;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
main {
  padding-top: 40px;
}
</style>
